//
//  MD5GenerateParse.m
//  betta
//
//  Created by betta on 5/15/15.
//  Copyright (c) 2015 Zhao Jing. All rights reserved.
//

#import "MD5GenerateParse.h"
#import <CommonCrypto/CommonDigest.h>

@implementation MD5GenerateParse

-(NSString*)generateMd5WithString:(NSString*)strInput
{
    const char* str = [strInput UTF8String];
    unsigned char result[CC_MD5_DIGEST_LENGTH];
    CC_MD5(str, strlen(str), result);
    NSMutableString *ret = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH];
    
    for(int i = 0; i<CC_MD5_DIGEST_LENGTH; i++) {
        [ret appendFormat:@"%02X",result[i]];
    }
    return ret;
}
-(NSString*)ParseMd5WithInputStr:(NSString*)strMd5
{
//parse wait finish
    NSString *str;
    return str;
}

@end
